package com.lzw.service.impl.dormitoryAdmin;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.lzw.mapper.dormitoryAdmin.RCRSMapper;
import com.lzw.pojo.RCR;
import com.lzw.service.dormitoryAdmin.RCRService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.List;

@Service
public class RCRServiceImpl implements RCRService {

    @Autowired
    private RCRSMapper rcrsMapper;

    @Override
    public List<RCR> list(Integer pageNum, Integer pageSize, String student) {
        PageHelper.startPage(pageNum,pageSize);
        List<RCR> list = rcrsMapper.list(student);
        Page<RCR> rcrs = (Page<RCR>) list;
        return rcrs;
    }

    @Override
    public void update(RCR rcr) {
        rcrsMapper.update(rcr);
    }

    @Override
    public void delete(List<Integer> ids) {
        rcrsMapper.delete(ids);
    }
}
